* lisp/replace.el (perform-replace): Avoid `isearch-range-invisible'
authorJuri Linkov <juri@jurta.org>
Thu, 30 May 2013 23:29:42 +0000 (02:29 +0300)
committerJuri Linkov <juri@jurta.org>
Thu, 30 May 2013 23:29:42 +0000 (02:29 +0300)
call when `query-flag' is nil and `search-invisible' is non-nil.

lisp/ChangeLog
lisp/replace.el

index 2878ec63a11d961d6ac30e89eb7bd6566788a915..a889b868194679345e43dbf39196d0f1e24c1e0a 100644 (file)
@@ -1,3 +1,9 @@
+2013-05-30  Juri Linkov  <juri@jurta.org>
+
+       * replace.el (perform-replace): Avoid `isearch-range-invisible'
+       call when `query-flag' is nil and `search-invisible' is non-nil.
+       (Bug#11746)
+
 2013-05-30  Glenn Morris  <rgm@gnu.org>
 
        * progmodes/cc-bytecomp.el (cc-bytecomp-noruntime-functions): New.
index 15d5f2694a8d9a147bbd6f171b23496c13b0a078..af05bd11fb2f57d0b5910ce1f682a54e7da1114f 100644 (file)
@@ -2093,6 +2093,9 @@ make, or the user didn't cancel the call."
            (setq skip-filtered-count (1+ skip-filtered-count)))
           ;; Optionally ignore invisible matches.
           ((not (or (eq search-invisible t)
+                    ;; Don't open overlays for automatic replacements.
+                    (and (not query-flag) search-invisible)
+                    ;; Open hidden overlays for interactive replacements.
                     (not (isearch-range-invisible
                           (nth 0 real-match-data) (nth 1 real-match-data)))))
            (setq skip-invisible-count (1+ skip-invisible-count)))